package com.game.springbootstart.mapper;

import com.game.springbootstart.entity.Notices;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 通知表 Mapper 接口
 * </p>
 *
 * @author author
 * @since 2025-01-24
 */
@Mapper
public interface NoticesMapper extends BaseMapper<Notices> {

    @Select("select content from game.notices where id = #{id}")
    String viewNotices(Integer id);

    @Select("select * from game.notices ORDER BY id DESC\n" +
            "LIMIT 1;")
    List<Notices> listBy();
}
